package io.jee.runshan.controller.web;

import io.jee.runshan.domain.Information;
import io.jee.runshan.service.IInformationService;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/web/information/")
public class WebInformationController {

	private static final String DETAIL = "web/weixin/information/detail";
	
	@Resource
	private IInformationService informationService;
	
	@RequestMapping("detail")
	public ModelAndView detail(Information information) {
		Information info = informationService.get(information.getId());
		return new ModelAndView(DETAIL).addObject("information", info);
	}
}
